<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
class CreateGroupMsgsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('group_msgs', function (Blueprint $table) {
            $table->id();
            $table->integer('user_id')->comment('发消息用户ID');
            $table->text('msg')->comment('群聊消息');
            $table->timestamps();
        });
        DB::statement("alter table `group_msgs` comment'群聊消息表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('group_msgs');
    }
}
